<template>
<div>
      <el-table :data="list" stripe style="width: 100%">
      <el-table-column prop="id" label="用户编号" width="180"> </el-table-column>
      <el-table-column prop="nickname" label="用户名称" width="180"> </el-table-column>
      <el-table-column prop="phone" label="手机号" width="180"> </el-table-column>
            <el-table-column prop="address" label="状态"> 
          <template slot-scope="scope" > 
          <el-button type="primary" v-if="scope.row.status==1">启用</el-button>
          <el-button type="info" v-else>禁用</el-button>
        </template>
      </el-table-column>
      <el-table-column prop="address" label="操作"> 
         <template slot-scope="scope">
          <el-button type="primary" @click="handleEdit(scope)">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
      props:["list"],
      methods:{
            handleEdit(scope){
                  this.$emit("willUpdate",scope.row.uid)
            }
      }
}
</script>

<style>

</style>